import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    access_token: "",
    role:"",
  },
  mutations: {
    changeLogin: function (state, user) {
       CryptoJS.enc.Base64.stringify(obj) //加密
       CryptoJS.enc.Base64.parse(base64).toString(CryptoJS.enc.Utf8)// 解密
      state.access_token = user.access_token;
      state.role = user.role;
    }
  },
  actions: {},
  modules: {}
});
